package com.avic.map.feign.impl;

import com.avic.map.feign.SystemServiceFeignService;
import com.avic.map.feign.client.SystemServiceFeignClient;
import com.avic.map.feign.client.request.CreateSystemLogReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author huangsheng on 2018/12/10
 */
@Service
@Slf4j
public class SystemServiceFeignImpl implements SystemServiceFeignService {

    @Autowired
    private SystemServiceFeignClient systemServiceFeignClient;

    @Override
    public void createSystemLog(String logDetail, String userId) {
        try {
            CreateSystemLogReq createSystemLogReq = new CreateSystemLogReq();
            createSystemLogReq.setLogDetail(logDetail);
            createSystemLogReq.setUserId(userId);
            systemServiceFeignClient.createSystemLog(createSystemLogReq);
        } catch (Exception e) {
            log.info("调用创建日志接口失败");
        }
    }
}
